//
//  TempViewController.swift
//  SinaWeibo
//
//  Created by Tony-ztb on 15/12/24.
//  Copyright © 2015年 Tony-ztb. All rights reserved.
//

import UIKit

class TempViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        // 背景颜色
        view.backgroundColor = UIColor.randomColor()
        
        title = "发表评论"
        // 设置导航条信息
        setNavBar()
        
    }
    
    
    // MARK: 设置导航条信息
    private func setNavBar() {
//        navigationItem.leftBarButtonItem = UIBarButtonItem(title: "取消", style: .Plain, target: self, action: "cancleComment")
        
                
        navigationItem.rightBarButtonItem = UIBarButtonItem(title: "发表", style: .Plain, target: self, action: "sendComment")
        
    }
    
//    @objc private func cancleComment() {
//        navigationController?.popViewControllerAnimated(true)
//    }
    
    
    @objc private func sendComment() {
        let temp = TempViewController()
        navigationController?.pushViewController(temp, animated: true)
    }

}
